ssl/crypto allocates its output buffers two ways.
@pony_alloc(@pony_ctx(), size) then from_cpointer, nine sites:
ssl/crypto/hash_fn.pony: the eight hash primitives (MD4 through SHA512), each with Array[U8].from_cpointer.
ssl/crypto/digest.pony: final(), with String.from_cpointer.
Array[U8].init(0, size), three sites:
ssl/crypto/rand_bytes.pony
ssl/crypto/hmac_sha256.pony
ssl/crypto/pbkdf2_sha256.pony
Both allocate a fixed-size buffer for OpenSSL to write into. #77 removed a comment that claimed the two differ for the garbage collector; they do not. It left unifying them as a separate question. This is that question.
ssl/cryptoallocates its output buffers two ways.@pony_alloc(@pony_ctx(), size)thenfrom_cpointer, nine sites:ssl/crypto/hash_fn.pony: the eight hash primitives (MD4throughSHA512), each withArray[U8].from_cpointer.ssl/crypto/digest.pony:final(), withString.from_cpointer.Array[U8].init(0, size), three sites:ssl/crypto/rand_bytes.ponyssl/crypto/hmac_sha256.ponyssl/crypto/pbkdf2_sha256.ponyBoth allocate a fixed-size buffer for OpenSSL to write into. #77 removed a comment that claimed the two differ for the garbage collector; they do not. It left unifying them as a separate question. This is that question.