Standard library / crypto/rc4
crypto/rc4.KeySizeError
Obsolete cipher; never use for new security systems. Reports the invalid key length in bytes. Use errors.As to classify constructor failures rather than parsing the text. Expected stdout: 'true 0\n'.
Formal Syntax & Structure
go syntaxgo
type KeySizeError intWorking Example
Example Snippetgo
package main
import ( "crypto/rc4" "errors" "fmt")
func main() { // Historical interoperability demonstration only. Never deploy this cipher/mode. _, err := rc4.NewCipher(nil) var k rc4.KeySizeError fmt.Println(errors.As(err, &k), int(k))}func must[T any](v T, e error) T { if e != nil { panic(e) } return v}func check(e error) { if e != nil { panic(e) }}