Skip to content

Instantly share code, notes, and snippets.

View stvnrlnd's full-sized avatar

Steven Roland stvnrlnd

View GitHub Profile
public function encodeToken($string)
{
return base64_encode(openssl_encrypt($string, $this->encrypt_method, hash('sha256', $this->secret), 0, substr(hash( 'sha256', $this->initialization_vector ), 0, 16)));
}
public function decodeToken($string)
{
return openssl_decrypt(base64_decode($string), $this->encrypt_method, hash('sha256', $this->secret), 0, substr(hash('sha256', $this->initialization_vector), 0, 16));
}
@stvnrlnd
stvnrlnd / info.php
Created March 27, 2018 04:15
Write a PHP script to get the PHP version and configuration information.
<?php
phpinfo();
?>
@stvnrlnd
stvnrlnd / wbr.html
Created February 26, 2017 15:32
The HTML wbr tag
<wbr>
@stvnrlnd
stvnrlnd / br.html
Created February 26, 2017 15:31
The HTML br tag
<br />
@stvnrlnd
stvnrlnd / span.html
Created February 26, 2017 15:30
The HTML span tag
<span>
</span>
@stvnrlnd
stvnrlnd / ruby-rt-rp.html
Created February 26, 2017 15:30
The HTML ruby, rt, and rp tags
<ruby>
<rp></rp>
<rt></rt>
</ruby>
@stvnrlnd
stvnrlnd / bdo.html
Created February 26, 2017 15:28
The HTML bdo tag
<bdo>
</bdo>
@stvnrlnd
stvnrlnd / bdi.html
Created February 26, 2017 15:27
The HTML bdi tag
<bdi>
</bdi>
@stvnrlnd
stvnrlnd / mark.html
Created February 26, 2017 15:27
The HTML mark tag
<mark>
</mark>
@stvnrlnd
stvnrlnd / var.html
Created February 26, 2017 15:26
The HTML var tag
<var>
</var>