Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions examples/.pony-lint.json

This file was deleted.

6 changes: 3 additions & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ different part of the ssl library. Ordered from simplest to most
involved: the hashing examples come first, the SSL networking example
follows.

## [hash-fn-example](hash-fn-example/)
## [hash-fn](hash-fn/)

Computes MD5, SHA1, and SHA256 hashes of a string in a single call each
and prints the results. Shows the one-shot convenience functions `MD5`,
`SHA1`, and `SHA256` from `ssl/crypto`, plus `ToHexString` for
formatting the resulting `Array[U8] val`. Start here if you're new to
the library.

## [digest-example](digest-example/)
## [digest](digest/)

Hashes data in chunks using the streaming `Digest` API. Creates a
`Digest.sha256()`, appends two string pieces with `append()`, and
finalizes with `final()` to produce the hash. Also demonstrates
`Digest.shake256(n)` for variable-length output on OpenSSL 3.0.x and
4.0.x, guarded by an `ifdef`.

## [ssl-client-server-example](ssl-client-server-example/)
## [ssl-client-server](ssl-client-server/)

Runs a TLS client and server in the same process, exchanging a few
messages over a loopback TCP connection. Demonstrates setting up an
Expand Down
7 changes: 7 additions & 0 deletions examples/digest/digest.pony
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""
Hashes data in chunks using the streaming `Digest` API from `ssl/crypto`.

Creates a SHA256 digest, appends data in two pieces, and finalizes to
produce the hash. On OpenSSL 3.0.x and 4.0.x, also demonstrates
`Digest.shake256` for variable-length output.
"""
File renamed without changes.
4 changes: 4 additions & 0 deletions examples/hash-fn/hash_fn.pony
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"""
Computes MD5, SHA1, and SHA256 hashes using the one-shot convenience
functions from `ssl/crypto`.
"""
File renamed without changes.
5 changes: 5 additions & 0 deletions examples/ssl-client-server/ssl_client_server.pony
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""
Runs a TLS client and server in the same process, exchanging messages
over a loopback TCP connection. Demonstrates `SSLContext` setup and
`SSLConnection` wrapping from `ssl/net`.
"""
Loading