Skip to content

Instantly share code, notes, and snippets.

@bg1bgst333
Created March 8, 2025 08:19
Show Gist options
  • Save bg1bgst333/20603b6b357e8bb8b71578982cdd9886 to your computer and use it in GitHub Desktop.
Save bg1bgst333/20603b6b357e8bb8b71578982cdd9886 to your computer and use it in GitHub Desktop.
Crypt::RC4
#!/usr/bin/perl
# RC4を使う.
use Crypt::RC4;
# キーとデータ.
$key = "secretkey";
$data = "ABCDEFGHIJ";
# 暗号化
my $encrypted = RC4($key, $data);
print "encrypted = $encrypted\n";
# 複合化
my $decrypted = RC4($key, $encrypted);
print "decrypted = $decrypted\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment