Co-authored-by: cooldome <ariabushenko@bk.ru>
This commit is contained in:
parent
d3b0132061
commit
f10689d3d4
2 changed files with 29 additions and 6 deletions
|
|
@ -48,3 +48,20 @@ proc `=destroy`(x: var AObj) =
|
|||
echo "closed"
|
||||
|
||||
var x = B(io: newStringStream("thestream"))
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# issue #14003
|
||||
|
||||
proc cryptCTR*(nonce: var openArray[char]) =
|
||||
nonce[1] = 'A'
|
||||
|
||||
proc main() =
|
||||
var nonce1 = "0123456701234567"
|
||||
cryptCTR(nonce1)
|
||||
doAssert(nonce1 == "0A23456701234567")
|
||||
var nonce2 = "01234567"
|
||||
cryptCTR(nonce2.toOpenArray(0, nonce2.len-1))
|
||||
doAssert(nonce2 == "0A234567")
|
||||
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue