anchor.diff:      bytes))
   
   (defun random-init ()
  +  "Initialize the random context (seeing it with random values from the OS).
  +   Once initialized, the context stays open until random-close is called (or
  +   until a comet hits earth, obliterating everything in its path).
  +
  +   TODO: add in random-state-preserving comet countermeasures"
     (when *yarrow-ctx*
       (error 'nettle-random-already-open :msg "Random context already open"))
  -  (let ((random-bytes (progn
  -                        #+(and windows (not cygwin)) (random-init-windows)
  -                        #-(and windows (not cygwin)) (random-init-posix))))
  -    (with-static-vectors ((seed 32))
  +  (let ((seed (progn
  +                #+(and windows (not cygwin)) (random-init-bytes-windows)
  +                #-(and windows (not cygwin)) (random-init-bytes-nix))))
  +    (with-static-vectors ((seed-s 32))
         (let ((ctx (cffi:foreign-alloc :char :count +yarrow256-ctx-size+)))
  -        (replace seed random-bytes)
  +        (replace seed-s seed)
           (ne:yarrow256-init ctx 0 (cffi:null-pointer))
  -        (ne:yarrow256-seed ctx ne:+yarrow256-seed-file-size+ (static-vector-pointer seed))
  +        (ne:yarrow256-seed ctx ne:+yarrow256-seed-file-size+ (static-vector-pointer seed-s))
           (setf *yarrow-ctx* ctx)))
       t))
   
  
positive.code:     (buffer :pointer)
      (buffer-size :unsigned-long)))
  
  (defun random-init-windows ()
    (with-static-vectors ((bytes 32))
      (%rtl-gen-random (static-vector-pointer bytes) 32)
      (copy-seq bytes)))
  
  (defun random-init-nix ()
    (let ((bytes (make-array 32 :element-type 'octet)))
      (with-open-file (rand "/dev/urandom" :direction :input :element-type 'octet)
        (dotimes (i 32)
  
negative.code: 
  (define-condition nettle-random-error (nettle-error) ()
    (:documentation "General PRNG error."))
  
  (define-condition nettle-random-init-fail (nettle-random-error) ()
    (:documentation "Thrown when random context init fails."))
  
  (define-condition nettle-random-already-open (nettle-random-error) ()
    (:documentation "Thrown when initing the already-open random context."))
  